//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#ifndef Green_RecoveryAddressGeneratorGPGPU_H
#define Green_RecoveryAddressGeneratorGPGPU_H

#include "RecoveryAddressGenerator.h"

namespace Green {

  /*!
    \class RecoveryAddressGeneratorGPGPU
    \brief GPGPU implementation class to generate addresses to use for recovery operations such as in fault handlers or register reloading.
  */
  class RecoveryAddressGeneratorGPGPU : public RecoveryAddressGenerator {
  public:
    explicit RecoveryAddressGeneratorGPGPU(const Generator* pGenerator); //!< Constructor
    SUBCLASS_DESTRUCTOR_DEFAULT(RecoveryAddressGeneratorGPGPU); //!< Destructor
    ASSIGNMENT_OPERATOR_ABSENT(RecoveryAddressGeneratorGPGPU);

    Object* Clone() const override { return new RecoveryAddressGeneratorGPGPU(*this); } //!< Return a cloned Object of the same type and same contents as the Object being cloned.
    const char* Type() const override { return "RecoveryAddressGeneratorGPGPU"; } //!< Return a string describing the actual type of the Object.
  protected:
    COPY_CONSTRUCTOR_DEFAULT(RecoveryAddressGeneratorGPGPU);
    const GenPageRequest* CreateGenPageRequest(cbool isInstr, const EMemAccessType memAccessType) const override; //!< Create a GenPageRequest instance with the appropriate configuration for recovery address generation.
  };

}

#endif  // Green_RecoveryAddressGeneratorGPGPU_H
